
cd /opt/install

wget http://acalnmp52.googlecode.com/svn/proftpd-1.3.4d.tar.gz
tar xzf proftpd-1.3.4d.tar.gz
cd proftpd-1.3.4d

./configure  '--prefix=/usr/local/proftpd' '--with-modules=mod_sql:mod_sql_mysql:mod_tls'  --enable-ssl
make -j 4 
make install

sed -i "s/nogroup/nobody/" /usr/local/proftpd/etc/proftpd.conf


groupadd -g 550 www
useradd -u  550 -g www www -s /sbin/nologin
mkdir -pv /data/httpd
chown www.www /data/httpd/ -vR

echo "SQLConnectInfo  proftpd@127.0.0.1  proftpd fcHYD
SQLMinUserGID 500
SQLMinUserUID 500
SQLLogFile           /var/log/proftpd-sql.log
SQLAuthTypes   Plaintext
SQLUserInfo    ftpusers userid passwd uid gid homedir shell
SQLGroupInfo   ftpgroups groupname gid members
SQLAuthenticate   users groups" >> /usr/local/proftpd/etc/proftpd.conf


wget http://acalnmp52.googlecode.com/svn/proftpd.sql
echo "############################################################ "
echo "source the proftpd.sql"